{% extends 'IMTUserBundle::layout-profile.html.twig' %}

{% block main_title %}Profil - Gérer mes comptes{% endblock %}

{% block include_style %}
{% endblock %}

{% block profil_ariane %}
<li>
	<i class="icon-home"></i><a href="{{ path('fos_user_profile_show') }}">Profil</a>
	<span class="divider">&raquo;</span>
</li>
<li>
	<a href="{{ path('imt_user_contact') }}">Contacts</a>
	<span class="divider">&raquo;</span>
</li>
<li>
	Editer contact
</li>
{% endblock %}

{% block profil_header %}
<div class="profile-head clearfix">
	<div class="profile-info pull-left">
		<h1 class="profile-username">Gérer mes contacts</h1>
	</div>
	
	<div class="btn-toolbar pull-right">
		<div class="btn-group">
			<a class="btn btn-success" href="{{ path('imt_user_contact_new') }}"><i class="icon-plus"></i> Ajouter un contact</a>
	    </div>
	</div>
</div>
{% endblock %}

{% block profil_menu %}
{% include 'IMTUserBundle::menu-profile.html.twig' with {'profile_menu_selected': 'contacts'} %}
{% endblock %}

{% block profil_content %}
<div class="profile-content">
	<div class="row-fluid">
		<div class="span7 widget">
		    <div class="widget-header light">
		    	<span class="title">Modification d'un contact</span>
		    	<div class="toolbar">
					<div class="btn-group">
						<a href="#" onclick="$(this).children('form').submit(); return false;" class="btn btn-danger"><i class="icon-remove"></i> Supprimer
					        <form action="{{ path('imt_user_contact_delete', { 'id': entity.id }) }}" method="post" class="hide">
					            {{ form_widget(delete_form) }}
					        </form>
				        </a>
					</div>
				</div>
		    </div>
		    <div class="widget-content form-container">
				<form class="form-horizontal" action="{{ path('imt_user_contact_update', {'id':entity.id}) }}" style="margin:0;" method="post" {{ form_enctype(form) }}>
				    {{ form_errors(form) }}
				
					{{ form_row(form.name, {'label':'Nom'}) }}
					{{ form_row(form.firstname, {'label':'Prénom'}) }}
					{{ form_row(form.email, {'label':'Email'}) }}
					{{ form_row(form.accounts) }}
				    
				    {{ form_widget(form._token) }}
			    	<div class="form-actions">
	                	<button class="btn btn-primary" type="submit">Modifier le contact</button>
	                </div>
				</form>
			</div>
	    </div>
	    
{# 	    <div class="span4">#}
{# 	    	<h4 class="sub"><span>Actions</span></h4>#}
{# 	    	<ul class="nav nav-tabs nav-stacked">#}
{# 				<li><a href="#">Voir mes contacts</a></li>#}
{# 			</ul>	    	#}
{# 	    </div>	    #}
	</div>
</div>
{% endblock %}